package cn.iocoder.yudao.module.promotion.activity.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.annotation.Nonnull;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

@Schema(description = "营销活动产品 Response VO")
@Data
@NoArgsConstructor
public abstract class ActivityProductRespVO {

    @Schema(description = "活动编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
    private Long activityId;

    @Schema(description = "活动信息", requiredMode = Schema.RequiredMode.REQUIRED)
    private ActivityVO activity;

    @Nonnull
    public ActivityVO getActivity() {
        if (activityId == null) {
            activity = new ActivityVO();
        }
        return activity;
    }

    @Schema(description = "店铺编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
    private Long shopId;

    @Schema(description = "产品 SPU 编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2048")
    private Long spuId;

    @Schema(description = "产品 SPU 名字", requiredMode = Schema.RequiredMode.REQUIRED, example = "一个白菜")
    private String spuName;

    @Schema(description = "产品 SKU 编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "4096")
    private Long skuId;

    @Schema(description = "产品 SKU 属性值", requiredMode = Schema.RequiredMode.REQUIRED, example = """
            ["黄色", "XXL"]
            """)
    private List<String> skuPropertyValues;

    @Schema(description = "产品名称（SPU 名称 + SKU 属性值）", requiredMode = Schema.RequiredMode.REQUIRED, example = "晚九点限时秒杀")
    private String name;

    @Schema(description = "产品图片", requiredMode = Schema.RequiredMode.REQUIRED, example = "4096")
    private String picUrl;

    @Schema(description = "产品销售价，单位：分", requiredMode = Schema.RequiredMode.REQUIRED, example = "50")
    private Integer price;

}
